package cn.itcast.service.system;

import cn.itcast.domain.system.User;
import com.github.pagehelper.PageInfo;

import java.util.List;

public interface UserService {
    //根据企业id查询所有用户
    List<User> findAll(String companyId);

    //根据id查询
    User findById(String userId);


    //添加用户
    void save(User user);

    //删除用户
    boolean delete(String userId);

    //更新用户
    void update(User user);

    PageInfo<User> findByPage(String companyId, Integer pageNum, Integer pageSize);


    void changeRole(String userId, String[] roleIds);

    User findByEmail(String email);
}
